<?php

if ( ! defined('BASEPATH')) exit('No direct script access allowed');

if ( ! function_exists('approved_method'))
{
    function approved_method($var = ' ' ,$dropdown = ' ',$all_dropdown = '')
    {
    	//$data = print_r($dropdown).'<br/>';
    	//$data = print_r($var);
    	//$data = print_r($all_dropdown);
	$data = '';
	$data .= '<input type=hidden name=caf_id value="'.$var[0]['caf_id'].'" />';
	$data .= '<fieldset id=personal_details>';
	$data .= '<legend>Personal Details</legend>';
	$data .= '<table align=left  width=100% >';
	$data .= '<tr>';
	$data .= '<td align=right>Mobile No:</td>';
	$data .= '<td align=left><input type=text name=mob_num value="'.$var[0]['batch_mobilenum'].'" size=20 />';
	$data .= '</td>';
	$data .= '</tr>';
	$data .= '<tr>';
	$data .= '<td align=right>Sim No:</td>';
	$data .= '<td align=left><input type=text name=sim_num value="sim number" size=30 />';
	$data .= '</td>';
	$data .= '</tr>';
	$data .= '<tr>';
	$data .= '<td align=right >Salutation:</td>';
	$data .= '<td align=left><select name=salutation><option value="'.$var[0]['caf_salutation'].'" >'.$var[0]['caf_salutation'].'</option>';
	$data .= '<option value=Mr> Mr.</option>';
	$data .= '<option value=Mrs>Mrs.</option>';
	$data .= '<option value=Ms>Ms.</option>';
	$data .= '<option value=Dr>Dr.</option>';
	$data .= '</select>&nbsp;';
	$data .= 'Sex:<select name=sex>';
	$data .= '<option value="'.$var[0]['caf_sex'].'">'.$var[0]['caf_sex'].'</option>';
	$data .= '<option value=M>M</option>';
	$data .= '<option value=F>F</option>';
	$data .= '</select>&nbsp;';
	list($yy,$mm,$dd) = explode("-",$var[0]['caf_dob']);
	$data .= 'DOB:<input type=text name=dob value="'.$dd.'/'.$mm.'/'.$yy.'" class="datepicker" size=8 />';
	$data .= '</td>';
	$data .= '</tr>';
	$data .= '<tr>';
	$data .= '<td align=right>Customer Name:</td>';
	$data .= '<td align=left><input type=text name=cust_name value="'.$var[0]['caf_customername'].'" size=30 />';
	$data .= '</td>';
	$data .= '</tr>';
	$data .= '<tr>';
	$data .= '<td align=right>Father Name:</td>';
	$data .= '<td align=left><input type=text name=father_name value="'.$var[0]['caf_fathersname'].'" size=30 />';
	$data .= '</td>';
	$data .= '</tr>';
	$data .= '<tr>';
	$data .= '<td align=right>Nationality:</td>';
	$data .= '<td align=left><input type=text name=nationality value="'.$var[0]['caf_nationality'].'" size=15 />';
	$data .= '</td>';
	$data .= '</tr>';
	$data .= '</table>';
	$data .= '</fieldset>';	
	$data .= '<fieldset id=proof>';
	$data .= '<legend>Proof Details</legend>';
	$data .= '<table>';
	$data .= '<tr>';
	$data .= '<td align=right>Proof ID:</td>';
	$data .= '<td align=left>';
	$data .= '<select name=proof >';
	$data .= '<option value="'.$dropdown[0]['poi_id'].'">'.$dropdown[0]['poi_desc'].'</option>';
	foreach($all_dropdown as $row)
	{
		
		$data .= '<option value="'.$row['poi_id'].'">'.$row['poi_desc'].'</option>';
	}
	$data .= '</select>';
	$data .= '</td>';
	$data .= '</tr>';
	$data .= '<tr>';
	$data .= '<td align=right>Proof Number:</td>';
	$data .= '<td align=left><input type=text name=proof_num value="'.$var[0]['caf_poidetails1'].'" size=30 />';
	$data .= '</td>';
	$data .= '</tr>';
	$data .= '</table>';
	
	$data .= '</fieldset>';
	
	return $data;
	
    }   
}

